<?php

defined('PDO_OAUTH_CONSUMER')||define('PDO_OAUTH_CONSUMER','t_oauth_consumer');
defined('PDO_OAUTH_ACCESS_TOKEN')||define('PDO_OAUTH_ACCESS_TOKEN','t_oauth_accesstoken');
defined('PDO_OAUTH_REQUEST_TOKEN')||define('PDO_OAUTH_REQUEST_TOKEN','t_oauth_requesttoken');

function oauth2dbconfig($tagname) {
	
	if($tagname == 't_oauth_consumer' || $tagname == 't_oauth_accesstoken' || $tagname == 't_oauth_requesttoken')
	{
		if ('DEV'==__UC_ENV) {
			return array(
				'driver' => 'mysql',
				'host' => '10.129.128.14',
				'port' => '3306',
				'username' => 'root',
				'password' => '123qwe',
				'database' => 'd_oauth',
				'table' => $tagname
			);
		} else if('TEST'==__UC_ENV) {
			return array(
				'driver' => 'mysql',
				'host' => '10.10.85.4',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => 'sdf2w@!w',
				'database' => 'd_oauth',
				'table' => $tagname
			);
		} else {
			return array(
				'driver' => 'mysql',
				'host' => '10.150.9.5',
				'port' => '8066',
				'username' => 'ucdbuser',
				'password' => '(qnO-ps:Oi^0F0',
				'database' => 'd_oauth',
				'table' => $tagname
			);
		}
	}
	return array();
}
